package uiux4;

public class BeanGugudan 
{
	public BeanGugudan()
	{
		
	}
	
	public String process(int dan)
	{
		String r="";
		int j;
		for(j=1; j<=9; j++)
			r = r + dan + " * " + j + " = " + dan*j + "\n";
		
		return r;
	}
	public String process(int sd, int ed)
	{
		String r="";
		int i;
		int j;
		if(sd>ed)
		{
			j = sd;
			sd = ed;
			ed = j;
		}
		for(i=sd;i<=ed;i++)
		{
			for(j=1; j<=9; j++)
			{
				r = r + i + " * " + j + " = " + i*j + "\n";
			}
		}
		return r;
	}
	
	public static void main(String args[])
	{
		BeanGugudan g = new BeanGugudan();
		
		System.out.println(g.process(5));
		System.out.println(g.process(2, 8));
	}

}
